package xiegd.study.TransActionTest;

import org.junit.Test;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 * @Author: xieguangda
 * @Description:
 * @Date: 2023/6/27 15:47
 */
public class MyTest00e {
    public static void main(String[] args) {
//        public Integer countServiceProduct(Long serviceOrderCode,Integer productType,Integer... serviceProductStatusList) {
//            return serviceOrderProductDetailMapper.countServiceProduct(serviceOrderCode,productType, Arrays.asList(serviceProductStatusList));
//        }


        countServiceProduct(1,2,3,4);



    }

    public static  Integer countServiceProduct(Integer productType,Integer... serviceProductStatusList){
        System.out.println("一开始的我：" + serviceProductStatusList + "," + productType);
        List<Integer> integers = Arrays.asList(serviceProductStatusList);
        System.out.println("我看看我的呢：："+integers+ "," + productType);
        return 1;
    }

    @Test
    public void mytes333() throws ParseException {
        SimpleDateFormat fmtObj = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        //date = fmtObj.parse(str);
        Date date1 = fmtObj.parse("2022-09-01 11:14:00");
        Date date2 = fmtObj.parse("2022-09-01 11:14:01");
        boolean equals = Objects.equals(date1, date2);
        System.out.println("看看我两一样不：" + equals);
    }

    @Test
    public void mytets444(){
        List<Integer> newList = new ArrayList<>();
        newList.add(1);
        newList.add(4);

        List newnewList = new ArrayList(newList);

        List<Integer> oldList = new ArrayList<>();
        oldList.add(1);
        oldList.add(2);
        oldList.add(4);
        //boolean remove = newList.remove(oldList);
        boolean b = newList.removeAll(oldList);
        //oldList.removeAll()

        oldList.removeAll(newnewList);
        System.out.println("我是什么：" + newList + oldList + newnewList);

    }
}
